package com.songcha.module_home.ui.activity.search

import com.songcha.library_base.mvvm.base.BaseRepository
import com.songcha.library_business.proxy.database.BookSearchHistoryDaoManager
import com.songcha.library_database_douyue.bean.BookSearchHistoryBean
import com.songcha.library_network.bean.BaseBean
import com.songcha.module_home.bean.SearchListDataBean
import com.songcha.module_home.api.HomeApiManager
import io.reactivex.Observable

class SearchRepository:BaseRepository() {
    fun getSearchHistory():Observable<MutableList<BookSearchHistoryBean>>{
        return Observable.just(BookSearchHistoryDaoManager.getSearchHistoryList())
    }

    fun searchBook(keyword:String):Observable<SearchListDataBean>{
        return HomeApiManager.api.searchBook(keyword)
    }

}